From 0b75f7a30f45203f1dbf24ddedd26feebb686fe7 Mon Sep 17 00:00:00 2001 From: Christian Persch Date: Tue, 26 Dec 2006 14:49:34 +0000 Subject: [PATCH] Return the correct value from gtk_notebook_insert_page if the page-added 2006-12-26 Christian Persch * gtk/gtknotebook.c: (gtk_notebook_real_insert_page): Return the correct value from gtk_notebook_insert_page if the page-added handler reorders the tabs. Bug #345094. --- ChangeLog | 6 ++++++ gtk/gtknotebook.c | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 8006d79e90..f559d14dd0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2006-12-26 Christian Persch + + * gtk/gtknotebook.c: (gtk_notebook_real_insert_page): + Return the correct value from gtk_notebook_insert_page if the + page-added handler reorders the tabs. Bug #345094. + 2006-12-26 Carlos Garnacho Fix small regressions in GtkNotebook tab detaching. Bug #378852. diff --git a/gtk/gtknotebook.c b/gtk/gtknotebook.c index 263c040d1c..85d9953fd1 100644 --- a/gtk/gtknotebook.c +++ b/gtk/gtknotebook.c @@ -3998,7 +3998,8 @@ gtk_notebook_real_insert_page (GtkNotebook *notebook, gtk_widget_child_notify (child, "position"); gtk_widget_thaw_child_notify (child); - return position; + /* The page-added handler might have reordered the pages, re-get the position */ + return gtk_notebook_page_num (notebook, child); } /* Private GtkNotebook Functions: -- 2.30.2